package com.asset.dispoal.agent.service;


import com.asset.dispoal.agent.api.SysAgentService;
import com.asset.dispoal.agent.dto.SysAgentRequest;
import com.asset.dispoal.agent.dto.SysAgentResponse;
import com.asset.dispoal.agent.service.common.SysAgentDelCommand;
import com.asset.dispoal.agent.service.common.SysAgentInsertCommand;
import com.asset.dispoal.agent.service.common.SysAgentQueryPageCommand;
import com.asset.dispoal.agent.service.common.SysAgentUpdateCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

/**
 * 批次证据种类映射表服务实现类
 *
 * @author: mhuang
 * @date: 2022-03-23 17:10:57
 */
@Service
public class SysAgentServiceImpl implements SysAgentService {

    @Autowired
    SysAgentDelCommand sysAgentDelCommand;

    @Autowired
    SysAgentUpdateCommand sysAgentUpdateCommand;

    @Autowired
    SysAgentQueryPageCommand sysAgentQueryPageCommand;

    @Autowired
    SysAgentInsertCommand sysAgentInsertCommand;


    @Override
    public Result insert(SysAgentRequest request) {
        return sysAgentInsertCommand.execute(request);
    }

    @Override
    public Result update(SysAgentRequest request) {
        return sysAgentUpdateCommand.execute(request);
    }

    @Override
    public Result delete(String id) {
        return sysAgentDelCommand.execute(id);

    }

    @Override
    public Result<PageVO<SysAgentResponse>> queryPage(SysAgentRequest request) {
        return sysAgentQueryPageCommand.execute(request);
    }
}